# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2023年02月23日
"""

import docx
from docx.shared import Cm,Pt
from docx.enum.text import WD_PARAGRAPH_ALIGNMENT


myDocument=docx.Document('散文名篇.docx')
myData=[['功能说明','Windows','Mac OS'],
        ['编辑菜单','Alt+E','Ctrl+F'],
        ['文件菜单','Alt+F','Ctrl+E'],
        ['视图菜单','Alt+V','Ctrl+V']]
myTable = myDocument.add_table(rows=4,cols=3,style='Table Grid')
for i in range(len(myData)):
	for j in range(len(myData[i])):
		myTable.rows[i].cells[j].text = myData[i][j]



myDocument.save('02散文名篇.docx')


